1. Field of the Invention
The present invention relates to an image coding apparatus utilizing global motion vector upon coding of image inputted by means of motion vector.
2. Description of the Related Art
Conventionally, in high-efficiency coding of image, the following three image transformations are mainly used for compressing amounts of moving image information, thereby carrying out coding. Therefore, the three image transformations are the first image transformation by means of correlation of image (spatial correlation), the second image transformation by means of correlation between times (time correlation), and the third image transformation by means of variable length coding. Specifically, in the second coding by means of time correlation, moving direction and moving distance of image between temporally-different frames (inputted images) are detected as ‘motion vector’ on a macro block basis, and a frame is expressed based on pixel information of the macro block and the motion vector information, thereby reducing the amount of image information.
However, in the detection process of the ‘motion vector’, when detecting a block in the other frame, a destination (or a source) of the macro block, for example, in the case of moving image including dynamic scenes such as a sports moving image, it is required to set a wide search range, thereby greatly increasing amounts of the calculation. Therefore, in WO00/05899, it is disclosed that the global motion vector of the entire image is detected by means of the reduced image of the current frame, and the search range of destination of the macro block is narrowed by means of the global motion vector, thereby detecting the motion vector.
FIG. 17 is a diagram exemplifying another detection of motion vector of the macro block by means of the above global motion vector. As shown FIG. 17 (a), at the outset, the global motion vector (1701) of the global macro block α′ including the macro block α, of which motion vector is to be detected, is detected. Therefore, it is probable that the macro block α moves within a predetermined range including the destination of the global macro block α′ indicated by this global motion vector. Therefore, calculation of the range β of FIG. 17 (b) as the search range of the motion vector of the macro block α is carried out, so that it becomes possible to detect the motion vector (1702) of the macro block α without unnecessarily widening search range.
However, in the above detection of the global motion vector used for the second image transformation, the detector for the global motion vector is arranged in the same chip of the image transformer utilizing spatial correlation as the first image transformation technology, resulting in two problems: they are as follows. The first problem is that a frame referenced upon detection of the global motion vector is not perfectly identical to an inputted image. The reason for this is that the referenced frame is reproduced by inverse transformation of data coded by irreversible transformation by means of the spatial correlation, in which high-frequency components acquired by DCT (Discrete Cosine Transform) are removed, and the remainder is cut by quantization, so that the frame is possibly not the same image as the source frame. Therefore, error can be observed in the global motion vector, which is detected by referring to the reference frame, incorrectly reproduced as described above.
In addition, the second problem is that the detection of the global motion vector is carried out upon high-efficiency coding of image even if the detection of the global motion vector is unnecessary. For example, in the case of a moving image configured by high-vision images of 1,920×1,080 pixels, the maximum moving distance on a pixel basis is 1,920 in a horizontal direction, and 1,080 in a vertical direction (therefore, on a ½-pixel basis, the moving distance is double), so that it is required to set wide search range. Meanwhile, in the case of a moving image configured by images of 320×240 pixels, the maximum moving distance on a pixel basis is 320 in a horizontal direction, and 240 in a vertical direction, so that it is enough to set narrow search range for detecting the moving distance of an image on a pixel basis (or on a ½-pixel basis, or on a ¼-pixel basis) in comparison with the above case, even if the movement of the image is same as the above case. Alternatively, there is a significant difference between the average moving distance in a moving image of a news program shot in a studio and that of a sports program. Thus, depending on type of moving image, the search range can be different. Accordingly, there is a case where it is enough to carry out detection of motion vector on a normal macro block basis without carrying out detection of global motion vector, thereby reducing the calculation amount.